package com.gopay.common.domain.cbrmb.customs.base;

import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlAttribute;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;
import javax.xml.bind.annotation.XmlType;

import com.gopay.common.constants.cbrmb.customs.NameSpace;

/**
 * 
 * @ClassName: CEB311Message 
 * @Description: CEB311Message为订单报文XML根节点名称 
 * @author gd.cui 
 * @date 2017年1月14日 上午10:42:16
 */
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "", propOrder = {
        "guid",
        "version",
        "order",
        "baseTransfer"
})
@XmlRootElement(name = "CEB311Message", namespace = NameSpace.NAMESPACE_CEB_URI)
public class CEB311Message {

    @XmlAttribute(name = "guid", namespace = NameSpace.NAMESPACE_CEB_URI, required = true)
    private String guid;

    /**
     * 报文版本号，默认为1.0
     */
    @XmlAttribute(name = "version", namespace = NameSpace.NAMESPACE_CEB_URI, required = true)
    private String version;

    /**
     * 放置订单业务的相关信息
     */
    @XmlElement(name = "Order", namespace = NameSpace.NAMESPACE_CEB_URI, required = true)
    private Order order;

    /**
     * 放置报文传输企业信息。
     */
    @XmlElement(name = "BaseTransfer", namespace = NameSpace.NAMESPACE_CEB_URI, required = true)
    private BaseTransfer baseTransfer;

    public String getGuid() {
		return guid;
	}
	public void setGuid(String guid) {
		this.guid = guid;
	}
	public String getVersion() {
		return version;
	}
	public void setVersion(String version) {
		this.version = version;
	}

	public Order getOrder() {
		return order;
	}
	public void setOrder(Order order) {
		this.order = order;
	}

	public BaseTransfer getBaseTransfer() {
		return baseTransfer;
	}
	public void setBaseTransfer(BaseTransfer baseTransfer) {
		this.baseTransfer = baseTransfer;
	}


	@Override
    public String toString() {
        String lineSeparator = System.getProperty("line.separator");
        StringBuilder sb = new StringBuilder();
        sb.append("**********CEB311Message************");
        sb.append(lineSeparator);
        sb.append(getGuid());
        sb.append(lineSeparator);
        sb.append(getVersion());
        sb.append(lineSeparator);
        sb.append(getOrder());
        return sb.toString();
    }
}
